<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts: fatfs.hal/mmc_hal.c Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">ESP8266ILI9341DisplayProject</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_2441aed259fe884ac729d0a0c31d0193.html">fatfs.hal</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">mmc_hal.c</div>  </div>
</div><!--header-->
<div class="contents">
<a href="mmc__hal_8c.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="user__config_8h.html">user_config.h</a>&quot;</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#ifdef AVR</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#include &lt;stdlib.h&gt;</span></div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="mathio_8h.html">printf/mathio.h</a>&quot;</span></div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="time_8h.html">lib/time.h</a>&quot;</span></div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="timer_8h.html">lib/timer.h</a>&quot;</span></div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="preprocessor">#ifdef ESP8266</span></div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="hspi_8h.html">esp8266/hspi.h</a>&quot;</span></div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="fatfs_8h.html">fatfs.sup/fatfs.h</a>&quot;</span></div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="keyword">extern</span> <a class="code" href="diskio_8h.html#adba6790898ce4029c20a34b898ce73c1">DSTATUS</a> <a class="code" href="mmc__hal_8c.html#a5e05b0c3f7ba56fa9c23be08c497eb9f">Stat</a>;</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;</div><div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="mmc__hal_8c.html#abf71973875545f3b42702ac99d5d87ef">   47</a></span>&#160;<a class="code" href="send_8c.html#a273cf69d639a59973b6019625df33e30">uint16_t</a> <a class="code" href="mmc__hal_8c.html#abf71973875545f3b42702ac99d5d87ef">_mmc_timeout</a> = 0;</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;</div><div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="mmc__hal_8c.html#a72ddc159b1a36ffda342f0f2d5c144f4">   50</a></span>&#160;<a class="code" href="send_8c.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> <a class="code" href="mmc__hal_8c.html#a72ddc159b1a36ffda342f0f2d5c144f4">_mmc_clock</a> = 0;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="comment">// @brief MMC media status prescaler</span></div><div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="mmc__hal_8c.html#adc0a07c5ad80e8ecbabee0cf04a1564e">   53</a></span>&#160;<a class="code" href="send_8c.html#a273cf69d639a59973b6019625df33e30">uint16_t</a> <a class="code" href="mmc__hal_8c.html#adc0a07c5ad80e8ecbabee0cf04a1564e">_mmc_pre</a> = 0;</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;</div><div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="mmc__hal_8c.html#a3371d3911fed5af510a9b6e313773171">   59</a></span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="mmc__hal_8c.html#a3371d3911fed5af510a9b6e313773171">mmc_task</a>(<span class="keywordtype">void</span>)</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;{</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    <span class="keywordflow">if</span>(<a class="code" href="mmc__hal_8c.html#abf71973875545f3b42702ac99d5d87ef">_mmc_timeout</a>)</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;        <a class="code" href="mmc__hal_8c.html#abf71973875545f3b42702ac99d5d87ef">_mmc_timeout</a>--;</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    <span class="comment">// 100HZ</span></div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    <span class="keywordflow">if</span>(<a class="code" href="mmc__hal_8c.html#adc0a07c5ad80e8ecbabee0cf04a1564e">_mmc_pre</a>++  &lt; 10)</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;        <span class="keywordflow">return</span>;</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;    <a class="code" href="mmc__hal_8c.html#adc0a07c5ad80e8ecbabee0cf04a1564e">_mmc_pre</a> = 0;</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    <a class="code" href="mmc_8c.html#a34555655fe13a47c95b35a2c13b85847">mmc_disk_timerproc</a>();</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;}</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="mmc__hal_8h.html#a35434a6e722b07d8fee213c2256391be">   79</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="mmc__hal_8c.html#a35434a6e722b07d8fee213c2256391be">mmc_install_timer</a>( <span class="keywordtype">void</span> )</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;{</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    <a class="code" href="mmc__hal_8c.html#abf71973875545f3b42702ac99d5d87ef">_mmc_timeout</a> = 0;</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    <span class="keywordflow">if</span>(<a class="code" href="timer_8c.html#a35f94fb84f1b626d8d1ace062b26c932">set_timers</a>(<a class="code" href="mmc__hal_8c.html#a3371d3911fed5af510a9b6e313773171">mmc_task</a>,1) == -1)</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;        <a class="code" href="mathio_8h.html#ad6078f8da2d30ecaef99e0c2d250c0c8">printf</a>(<span class="stringliteral">&quot;MMC Clock task init failed\n&quot;</span>);</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;}</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;</div><div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="mmc__hal_8h.html#aede64c733decb26d1af6f8e77628b71e">   88</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="mmc__hal_8c.html#ae9d8b33ee8fd54f03d5d6946d6022df9">mmc_spi_init</a>()</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;{</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    <a class="code" href="hal_8c.html#a9eaae771107e6e01ef45ebe31ca99fdb">chip_select_init</a>(MMC_CS);</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    <a class="code" href="mmc__hal_8c.html#a120c1501f6694e4947cb37f09679dda9">mmc_slow</a>();</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;}</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;</div><div class="line"><a name="l00097"></a><span class="lineno"><a class="line" href="mmc__hal_8h.html#abdc5ab6358ed33bc5a98a11fde82b704">   97</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="mmc__hal_8c.html#a6baca506fd7fb368a968a82e9093b4a0">mmc_spi_begin</a>()</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;{</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    <a class="code" href="hal_8c.html#acd8b481ba21b545f53061c5ab7ff451e">spi_begin</a>(<a class="code" href="mmc__hal_8c.html#a72ddc159b1a36ffda342f0f2d5c144f4">_mmc_clock</a>,MMC_CS);</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;}</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;</div><div class="line"><a name="l00104"></a><span class="lineno"><a class="line" href="mmc__hal_8h.html#a4963fd4e3ba8fabe799b88073aea0499">  104</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="mmc__hal_8c.html#a3ef82f5ac21c4adcf55addccf88f3d5a">mmc_spi_end</a>()</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;{</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    <a class="code" href="hal_8c.html#a38fdaad472c50237f3d8821a01cda360">spi_end</a>(MMC_CS);</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;}</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;</div><div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="mmc__hal_8h.html#a03e4e29ebb0844123378d72b41bf3575">  113</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="mmc__hal_8c.html#a120c1501f6694e4947cb37f09679dda9">mmc_slow</a>()</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;{</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    <a class="code" href="mmc__hal_8c.html#a72ddc159b1a36ffda342f0f2d5c144f4">_mmc_clock</a> = MMC_SLOW;</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;}</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;</div><div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="mmc__hal_8h.html#afd5747681a788dc27943f736e57eeb54">  123</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="mmc__hal_8c.html#a7d41efb1efa51ca4c815ee275553ecae">mmc_fast</a>()</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;{</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;    <a class="code" href="mmc__hal_8c.html#a72ddc159b1a36ffda342f0f2d5c144f4">_mmc_clock</a> = MMC_FAST;</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;}</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;</div><div class="line"><a name="l00133"></a><span class="lineno"><a class="line" href="mmc__hal_8h.html#a850895a4f23c495249a3074fd2dafbcb">  133</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="mmc__hal_8c.html#a850895a4f23c495249a3074fd2dafbcb">mmc_spi_TX_buffer</a>(<span class="keyword">const</span> <a class="code" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data, <span class="keywordtype">int</span> count)</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;{</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    <a class="code" href="hal_8c.html#a445c14cf602a0b3dd085ee963a7986a0">spi_TX_buffer</a>((<a class="code" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *) data,count);</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;}</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;</div><div class="line"><a name="l00142"></a><span class="lineno"><a class="line" href="mmc__hal_8h.html#ac5b4aae5665fe63d3d0a280215f759f8">  142</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="mmc__hal_8c.html#ac5b4aae5665fe63d3d0a280215f759f8">mmc_spi_RX_buffer</a>(<span class="keyword">const</span> <a class="code" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data, <span class="keywordtype">int</span> count)</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;{</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;    <a class="code" href="hal_8c.html#a1fca48fcdb736ef3af2179ae8b10d963">spi_RX_buffer</a>((<a class="code" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *) data,count);</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;}</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;</div><div class="line"><a name="l00150"></a><span class="lineno"><a class="line" href="mmc__hal_8h.html#a8f6b7c1f3819cd4bd2aa114c8ebb7f19">  150</a></span>&#160;<a class="code" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="mmc__hal_8c.html#a8f6b7c1f3819cd4bd2aa114c8ebb7f19">mmc_spi_TXRX</a>(<a class="code" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> data)</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;{</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;    <span class="keywordflow">return</span>( <a class="code" href="hal_8c.html#a9617412610d280bbb4886674790d7d3e">spi_TXRX</a>(data) );</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;}</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00161"></a><span class="lineno"><a class="line" href="mmc__hal_8h.html#a95af3dbb0e5e0a16710138786c29fb4f">  161</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="mmc__hal_8c.html#a95af3dbb0e5e0a16710138786c29fb4f">mmc_set_ms_timeout</a>(<a class="code" href="send_8c.html#a273cf69d639a59973b6019625df33e30">uint16_t</a> ms)</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;{</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;    <a class="code" href="mmc__hal_8h.html#ae150a8179a17d87a2a72bc2d5705d835">mmc_cli</a>();</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    <a class="code" href="mmc__hal_8c.html#abf71973875545f3b42702ac99d5d87ef">_mmc_timeout</a> = ms;</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;    <a class="code" href="mmc__hal_8h.html#ae88a5c46f00c634234441978491b16fe">mmc_sei</a>();</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;}</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00172"></a><span class="lineno"><a class="line" href="mmc__hal_8h.html#a852a35d5ff10bfbe64bcb06ca9a3aeb8">  172</a></span>&#160;<span class="keywordtype">int</span>  <a class="code" href="mmc__hal_8c.html#a7383533f1b6630ff4f0337f400b4b62e">mmc_test_timeout</a>()</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;{</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;    <span class="keywordflow">if</span>( <a class="code" href="mmc__hal_8c.html#a5e05b0c3f7ba56fa9c23be08c497eb9f">Stat</a> &amp; <a class="code" href="diskio_8h.html#aec625080763d6cf487e550a6c9a2dd19">STA_NODISK</a> )</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;        <span class="keywordflow">return</span>(1);</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;<span class="preprocessor">#ifdef ESP8266</span></div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;        <a class="code" href="user__task_8c.html#a863d8bc03e69f2efee6042bcec7b456b">optimistic_yield</a>(1000);</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;        <a class="code" href="system_8c.html#a9b9f170e9a01e51b57656fcda1f183df">wdt_reset</a>();</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;    <span class="keywordflow">if</span>(!<a class="code" href="mmc__hal_8c.html#abf71973875545f3b42702ac99d5d87ef">_mmc_timeout</a>)</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;    {</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;        <a class="code" href="mathio_8h.html#ad6078f8da2d30ecaef99e0c2d250c0c8">printf</a>(<span class="stringliteral">&quot;MMC TIMEOUT\n&quot;</span>);</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;        <a class="code" href="mmc__hal_8c.html#a5e05b0c3f7ba56fa9c23be08c497eb9f">Stat</a> |= (STA_NODISK | <a class="code" href="diskio_8h.html#abd6503c70d862b979a3f7080a59e9acd">STA_NOINIT</a>);</div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;        <span class="keywordflow">return</span>(1);</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;    }</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;    <span class="keywordflow">return</span>(0);</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;}</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00194"></a><span class="lineno"><a class="line" href="mmc__hal_8h.html#abb3b85d2e3abc4df68487df05510bb55">  194</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="mmc__hal_8c.html#abb3b85d2e3abc4df68487df05510bb55">mmc_ms_wait</a>(<span class="keywordtype">int</span> ms)</div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;{</div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;    <a class="code" href="mmc__hal_8c.html#a95af3dbb0e5e0a16710138786c29fb4f">mmc_set_ms_timeout</a>(ms);</div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;    <span class="keywordflow">while</span>(!<a class="code" href="mmc__hal_8c.html#a7383533f1b6630ff4f0337f400b4b62e">mmc_test_timeout</a>())</div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;        ;</div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;}</div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;</div><div class="line"><a name="l00202"></a><span class="lineno"><a class="line" href="mmc__hal_8c.html#a530d484dee6be1fc954f32f677add7c4">  202</a></span>&#160;<span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="mmc__hal_8c.html#a530d484dee6be1fc954f32f677add7c4">mmc_init_flag</a> = 0;</div><div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00208"></a><span class="lineno"><a class="line" href="mmc__hal_8h.html#ad417477e66c88b40dcce683fd6a5c47a">  208</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="mmc__hal_8c.html#ad417477e66c88b40dcce683fd6a5c47a">mmc_init</a>(<span class="keywordtype">int</span> verbose)</div><div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;{</div><div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;    <span class="keywordtype">int</span> rc;</div><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;</div><div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;    <a class="code" href="mmc__hal_8c.html#a5e05b0c3f7ba56fa9c23be08c497eb9f">Stat</a> = 0;</div><div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;</div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;    <a class="code" href="mmc__hal_8c.html#ae9d8b33ee8fd54f03d5d6946d6022df9">mmc_spi_init</a>();</div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;</div><div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;    <span class="keywordflow">if</span>( verbose)</div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;    {</div><div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;        <a class="code" href="mathio_8h.html#ad6078f8da2d30ecaef99e0c2d250c0c8">printf</a>(<span class="stringliteral">&quot;START MMC INIT\n&quot;</span>);</div><div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;    }</div><div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;    <span class="comment">// we only install timers once!</span></div><div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;    <span class="keywordflow">if</span>(!<a class="code" href="mmc__hal_8c.html#a530d484dee6be1fc954f32f677add7c4">mmc_init_flag</a>)</div><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;        <a class="code" href="mmc__hal_8c.html#a35434a6e722b07d8fee213c2256391be">mmc_install_timer</a>();</div><div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;</div><div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;    <span class="keywordflow">if</span>( verbose)</div><div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;    {</div><div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;<span class="preprocessor">#if defined (_USE_LFN)</span></div><div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;        <a class="code" href="mathio_8h.html#ad6078f8da2d30ecaef99e0c2d250c0c8">printf</a>(<span class="stringliteral">&quot;LFN Enabled&quot;</span>);</div><div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;<span class="preprocessor">#else</span></div><div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;        <a class="code" href="mathio_8h.html#ad6078f8da2d30ecaef99e0c2d250c0c8">printf</a>(<span class="stringliteral">&quot;LFN Disabled&quot;</span>);</div><div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;        <a class="code" href="mathio_8h.html#ad6078f8da2d30ecaef99e0c2d250c0c8">printf</a>(<span class="stringliteral">&quot;, Code page: %u\n&quot;</span>, <a class="code" href="ffconf_8h.html#aaf9b5cee569d93f1ebe43ea70916569f">_CODE_PAGE</a>);</div><div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;    }</div><div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;</div><div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;    rc = <a class="code" href="diskio_8c.html#a09cdaa6f36fa409bdf002727bff98eb1">disk_initialize</a>(0);    <span class="comment">// aliased to mmc_disk_initialize()</span></div><div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;</div><div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;    <span class="keywordflow">if</span>( rc != <a class="code" href="diskio_8h.html#aacdfef1dad6565f65c26d12fe0ea4b2ba2ea4b6ef3fffc17dd1d38ab5c2837737">RES_OK</a>  || verbose )</div><div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;    {</div><div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;        <a class="code" href="fatfs__sup_8c.html#ab3509aecf1844c84f1797e5b567d531c">put_rc</a>(rc);</div><div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;    }</div><div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;</div><div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;    <span class="keywordflow">if</span>( rc == <a class="code" href="diskio_8h.html#aacdfef1dad6565f65c26d12fe0ea4b2ba2ea4b6ef3fffc17dd1d38ab5c2837737">RES_OK</a>)</div><div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;    {</div><div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;        rc = <a class="code" href="ff_8c.html#a3bff54412627eb9cf8951ec88a464d1c">f_mount</a>(&amp;<a class="code" href="fatfs__sup_8c.html#aae427cc909a4b5993032934d85fd8c31">Fatfs</a>[0],<span class="stringliteral">&quot;/&quot;</span>, 0);</div><div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;    }</div><div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;</div><div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;    <span class="keywordflow">if</span>( rc != <a class="code" href="diskio_8h.html#aacdfef1dad6565f65c26d12fe0ea4b2ba2ea4b6ef3fffc17dd1d38ab5c2837737">RES_OK</a> || verbose)</div><div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;    {</div><div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;        <a class="code" href="fatfs__sup_8c.html#ab3509aecf1844c84f1797e5b567d531c">put_rc</a>( rc );</div><div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;    }</div><div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;</div><div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;    <span class="keywordflow">if</span> (verbose )</div><div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;    {</div><div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;        <a class="code" href="integer_8h.html#ad342ac907eb044443153a22f964bf0af">DWORD</a> blksize = 0;</div><div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;        <span class="keywordflow">if</span>(rc == <a class="code" href="diskio_8h.html#aacdfef1dad6565f65c26d12fe0ea4b2ba2ea4b6ef3fffc17dd1d38ab5c2837737">RES_OK</a>)</div><div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;        {</div><div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;            rc = <a class="code" href="diskio_8c.html#ab00fa450a811dbdabe3c655c1a36fab4">disk_ioctl</a> ( 0, <a class="code" href="diskio_8h.html#aec3bb4dfe075d0ba2f3b07b300a95500">GET_BLOCK_SIZE</a>, (<span class="keywordtype">void</span> *) &amp;blksize);</div><div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;            <span class="keywordflow">if</span>( rc != <a class="code" href="diskio_8h.html#aacdfef1dad6565f65c26d12fe0ea4b2ba2ea4b6ef3fffc17dd1d38ab5c2837737">RES_OK</a>)</div><div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;            {</div><div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;                <a class="code" href="fatfs__sup_8c.html#ab3509aecf1844c84f1797e5b567d531c">put_rc</a>( rc );</div><div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;                <a class="code" href="mathio_8h.html#ad6078f8da2d30ecaef99e0c2d250c0c8">printf</a>(<span class="stringliteral">&quot;MMC Block Size - read failed\n&quot;</span>);</div><div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;            }</div><div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;            <span class="keywordflow">else</span></div><div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;            {</div><div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;                <a class="code" href="mathio_8h.html#ad6078f8da2d30ecaef99e0c2d250c0c8">printf</a>(<span class="stringliteral">&quot;MMC Block Size: %ld\n&quot;</span>, blksize);</div><div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;            }</div><div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;            <span class="keywordflow">if</span>( rc == <a class="code" href="diskio_8h.html#aacdfef1dad6565f65c26d12fe0ea4b2ba2ea4b6ef3fffc17dd1d38ab5c2837737">RES_OK</a>)</div><div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;            {</div><div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;                <a class="code" href="fatfs__sup_8c.html#ad7d2063fab39190a7288bfa7cb647b46">fatfs_status</a>(<span class="stringliteral">&quot;/&quot;</span>);</div><div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;            }</div><div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;        }</div><div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;        <a class="code" href="mathio_8h.html#ad6078f8da2d30ecaef99e0c2d250c0c8">printf</a>(<span class="stringliteral">&quot;END MMC INIT\n&quot;</span>);</div><div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;    }</div><div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;    <a class="code" href="mmc__hal_8c.html#a530d484dee6be1fc954f32f677add7c4">mmc_init_flag</a> = 1;</div><div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;</div><div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;    <span class="keywordflow">return</span>( rc ) ;</div><div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;}</div><div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;</div><div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00282"></a><span class="lineno"><a class="line" href="mmc__hal_8h.html#a8b718faa35b9304193cd0c074b542f8a">  282</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="mmc__hal_8c.html#a5ebdcf7dd5b0f47163d20481a5d09e00">mmc_power_on</a>()</div><div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;{</div><div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;}</div><div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;</div><div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00290"></a><span class="lineno"><a class="line" href="mmc__hal_8h.html#ac9deae120e9c3b519ea62bf4c486e2ea">  290</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="mmc__hal_8c.html#af1357b405b44e70bd22a537e67fc56db">mmc_power_off</a>()</div><div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;{</div><div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;}</div><div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;</div><div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;</div><div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00300"></a><span class="lineno"><a class="line" href="mmc__hal_8h.html#ab9dae194babcfe774428305a575556cc">  300</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="mmc__hal_8c.html#a76337667431fa723bc6d50503a52f8e0">mmc_ins_status</a>()</div><div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;{</div><div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;    <span class="keywordflow">return</span> (1);</div><div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;}</div><div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;</div><div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;</div><div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;</div><div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;</div><div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;<a class="code" href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="line"><a name="l00313"></a><span class="lineno"><a class="line" href="mmc__hal_8h.html#a5d4cd1450305a6f9ad8ebd1a19a606c5">  313</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="mmc__hal_8c.html#acbc9faece423623a86f62b50ac59b312">mmc_wp_status</a>()</div><div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;{</div><div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;    <span class="keywordflow">return</span> (0);</div><div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;}</div><div class="ttc" id="diskio_8h_html_aec3bb4dfe075d0ba2f3b07b300a95500"><div class="ttname"><a href="diskio_8h.html#aec3bb4dfe075d0ba2f3b07b300a95500">GET_BLOCK_SIZE</a></div><div class="ttdeci">#define GET_BLOCK_SIZE</div><div class="ttdef"><b>Definition:</b> <a href="diskio_8h_source.html#l00064">diskio.h:64</a></div></div>
<div class="ttc" id="mmc__hal_8h_html_ae150a8179a17d87a2a72bc2d5705d835"><div class="ttname"><a href="mmc__hal_8h.html#ae150a8179a17d87a2a72bc2d5705d835">mmc_cli</a></div><div class="ttdeci">#define mmc_cli()</div><div class="ttdef"><b>Definition:</b> <a href="mmc__hal_8h_source.html#l00034">mmc_hal.h:34</a></div></div>
<div class="ttc" id="diskio_8h_html_abd6503c70d862b979a3f7080a59e9acd"><div class="ttname"><a href="diskio_8h.html#abd6503c70d862b979a3f7080a59e9acd">STA_NOINIT</a></div><div class="ttdeci">#define STA_NOINIT</div><div class="ttdef"><b>Definition:</b> <a href="diskio_8h_source.html#l00053">diskio.h:53</a></div></div>
<div class="ttc" id="send_8c_html_a273cf69d639a59973b6019625df33e30"><div class="ttname"><a href="send_8c.html#a273cf69d639a59973b6019625df33e30">uint16_t</a></div><div class="ttdeci">unsigned short uint16_t</div><div class="ttdef"><b>Definition:</b> <a href="send_8c_source.html#l00018">send.c:18</a></div></div>
<div class="ttc" id="mmc__hal_8c_html_adc0a07c5ad80e8ecbabee0cf04a1564e"><div class="ttname"><a href="mmc__hal_8c.html#adc0a07c5ad80e8ecbabee0cf04a1564e">_mmc_pre</a></div><div class="ttdeci">uint16_t _mmc_pre</div><div class="ttdef"><b>Definition:</b> <a href="mmc__hal_8c_source.html#l00053">mmc_hal.c:53</a></div></div>
<div class="ttc" id="hal_8c_html_acd8b481ba21b545f53061c5ab7ff451e"><div class="ttname"><a href="hal_8c.html#acd8b481ba21b545f53061c5ab7ff451e">spi_begin</a></div><div class="ttdeci">void spi_begin(uint32_t clock, int pin)</div><div class="ttdoc">SPI chip enable function Function waits for current tranaction to finish before proceeding. </div><div class="ttdef"><b>Definition:</b> <a href="hal_8c_source.html#l00355">hal.c:355</a></div></div>
<div class="ttc" id="user__config_8h_html"><div class="ttname"><a href="user__config_8h.html">user_config.h</a></div><div class="ttdoc">Master include file for project Includes all project includes and defines here. </div></div>
<div class="ttc" id="time_8h_html"><div class="ttname"><a href="time_8h.html">time.h</a></div><div class="ttdoc">Common Linux/POSIX time functions. </div></div>
<div class="ttc" id="mmc__hal_8c_html_a3371d3911fed5af510a9b6e313773171"><div class="ttname"><a href="mmc__hal_8c.html#a3371d3911fed5af510a9b6e313773171">mmc_task</a></div><div class="ttdeci">static void mmc_task(void)</div><div class="ttdoc">1000HZ timer task </div><div class="ttdef"><b>Definition:</b> <a href="mmc__hal_8c_source.html#l00059">mmc_hal.c:59</a></div></div>
<div class="ttc" id="send_8c_html_a435d1572bf3f880d55459d9805097f62"><div class="ttname"><a href="send_8c.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a></div><div class="ttdeci">unsigned int uint32_t</div><div class="ttdef"><b>Definition:</b> <a href="send_8c_source.html#l00019">send.c:19</a></div></div>
<div class="ttc" id="mmc__hal_8c_html_abf71973875545f3b42702ac99d5d87ef"><div class="ttname"><a href="mmc__hal_8c.html#abf71973875545f3b42702ac99d5d87ef">_mmc_timeout</a></div><div class="ttdeci">uint16_t _mmc_timeout</div><div class="ttdoc">MMC timeout counter in ms. </div><div class="ttdef"><b>Definition:</b> <a href="mmc__hal_8c_source.html#l00047">mmc_hal.c:47</a></div></div>
<div class="ttc" id="mmc__hal_8c_html_ac5b4aae5665fe63d3d0a280215f759f8"><div class="ttname"><a href="mmc__hal_8c.html#ac5b4aae5665fe63d3d0a280215f759f8">mmc_spi_RX_buffer</a></div><div class="ttdeci">void mmc_spi_RX_buffer(const uint8_t *data, int count)</div><div class="ttdoc">SPI read buffer. </div><div class="ttdef"><b>Definition:</b> <a href="mmc__hal_8c_source.html#l00142">mmc_hal.c:142</a></div></div>
<div class="ttc" id="mmc__hal_8c_html_a120c1501f6694e4947cb37f09679dda9"><div class="ttname"><a href="mmc__hal_8c.html#a120c1501f6694e4947cb37f09679dda9">mmc_slow</a></div><div class="ttdeci">void mmc_slow()</div><div class="ttdoc">MMC set slow SPI bus speed Only called when deselected. </div><div class="ttdef"><b>Definition:</b> <a href="mmc__hal_8c_source.html#l00113">mmc_hal.c:113</a></div></div>
<div class="ttc" id="timer_8c_html_a35f94fb84f1b626d8d1ace062b26c932"><div class="ttname"><a href="timer_8c.html#a35f94fb84f1b626d8d1ace062b26c932">set_timers</a></div><div class="ttdeci">MEMSPACE int set_timers(void(*handler)(void), int timer)</div><div class="ttdoc">Install a user timer task. </div><div class="ttdef"><b>Definition:</b> <a href="timer_8c_source.html#l00060">timer.c:60</a></div></div>
<div class="ttc" id="mmc__hal_8c_html_a72ddc159b1a36ffda342f0f2d5c144f4"><div class="ttname"><a href="mmc__hal_8c.html#a72ddc159b1a36ffda342f0f2d5c144f4">_mmc_clock</a></div><div class="ttdeci">uint32_t _mmc_clock</div><div class="ttdoc">MMC SPI CLOCK cache. </div><div class="ttdef"><b>Definition:</b> <a href="mmc__hal_8c_source.html#l00050">mmc_hal.c:50</a></div></div>
<div class="ttc" id="timer_8h_html"><div class="ttname"><a href="timer_8h.html">timer.h</a></div><div class="ttdoc">timer functions </div></div>
<div class="ttc" id="mmc_8c_html_a34555655fe13a47c95b35a2c13b85847"><div class="ttname"><a href="mmc_8c.html#a34555655fe13a47c95b35a2c13b85847">mmc_disk_timerproc</a></div><div class="ttdeci">void mmc_disk_timerproc(void)</div><div class="ttdoc">Write Sector(s) </div><div class="ttdef"><b>Definition:</b> <a href="mmc_8c_source.html#l00708">mmc.c:708</a></div></div>
<div class="ttc" id="user__task_8c_html_a863d8bc03e69f2efee6042bcec7b456b"><div class="ttname"><a href="user__task_8c.html#a863d8bc03e69f2efee6042bcec7b456b">optimistic_yield</a></div><div class="ttdeci">void optimistic_yield(uint32_t interval_us)</div><div class="ttdef"><b>Definition:</b> <a href="user__task_8c_source.html#l00102">user_task.c:102</a></div></div>
<div class="ttc" id="fatfs__sup_8c_html_ad7d2063fab39190a7288bfa7cb647b46"><div class="ttname"><a href="fatfs__sup_8c.html#ad7d2063fab39190a7288bfa7cb647b46">fatfs_status</a></div><div class="ttdeci">MEMSPACE void fatfs_status(char *ptr)</div><div class="ttdoc">Compute space used, number of directories and files contained used by a drive. </div><div class="ttdef"><b>Definition:</b> <a href="fatfs__sup_8c_source.html#l00268">fatfs_sup.c:268</a></div></div>
<div class="ttc" id="integer_8h_html_ad342ac907eb044443153a22f964bf0af"><div class="ttname"><a href="integer_8h.html#ad342ac907eb044443153a22f964bf0af">DWORD</a></div><div class="ttdeci">unsigned long DWORD</div><div class="ttdef"><b>Definition:</b> <a href="integer_8h_source.html#l00031">integer.h:31</a></div></div>
<div class="ttc" id="ffconf_8h_html_aaf9b5cee569d93f1ebe43ea70916569f"><div class="ttname"><a href="ffconf_8h.html#aaf9b5cee569d93f1ebe43ea70916569f">_CODE_PAGE</a></div><div class="ttdeci">#define _CODE_PAGE</div><div class="ttdef"><b>Definition:</b> <a href="ffconf_8h_source.html#l00080">ffconf.h:80</a></div></div>
<div class="ttc" id="hal_8c_html_a38fdaad472c50237f3d8821a01cda360"><div class="ttname"><a href="hal_8c.html#a38fdaad472c50237f3d8821a01cda360">spi_end</a></div><div class="ttdeci">void spi_end(uint8_t pin)</div><div class="ttdoc">SPI chip disable function wait for current tranaction to finish! </div><div class="ttdef"><b>Definition:</b> <a href="hal_8c_source.html#l00388">hal.c:388</a></div></div>
<div class="ttc" id="hal_8c_html_a9eaae771107e6e01ef45ebe31ca99fdb"><div class="ttname"><a href="hal_8c.html#a9eaae771107e6e01ef45ebe31ca99fdb">chip_select_init</a></div><div class="ttdeci">void chip_select_init(uint8_t pin)</div><div class="ttdoc">CHIP select HAL. </div><div class="ttdef"><b>Definition:</b> <a href="hal_8c_source.html#l00198">hal.c:198</a></div></div>
<div class="ttc" id="mmc__hal_8c_html_af1357b405b44e70bd22a537e67fc56db"><div class="ttname"><a href="mmc__hal_8c.html#af1357b405b44e70bd22a537e67fc56db">mmc_power_off</a></div><div class="ttdeci">MEMSPACE void mmc_power_off()</div><div class="ttdoc">MMC Power OFF. </div><div class="ttdef"><b>Definition:</b> <a href="mmc__hal_8c_source.html#l00290">mmc_hal.c:290</a></div></div>
<div class="ttc" id="mmc__hal_8c_html_a76337667431fa723bc6d50503a52f8e0"><div class="ttname"><a href="mmc__hal_8c.html#a76337667431fa723bc6d50503a52f8e0">mmc_ins_status</a></div><div class="ttdeci">MEMSPACE int mmc_ins_status()</div><div class="ttdoc">MMC Card Inserted status. </div><div class="ttdef"><b>Definition:</b> <a href="mmc__hal_8c_source.html#l00300">mmc_hal.c:300</a></div></div>
<div class="ttc" id="diskio_8h_html_adba6790898ce4029c20a34b898ce73c1"><div class="ttname"><a href="diskio_8h.html#adba6790898ce4029c20a34b898ce73c1">DSTATUS</a></div><div class="ttdeci">BYTE DSTATUS</div><div class="ttdef"><b>Definition:</b> <a href="diskio_8h_source.html#l00020">diskio.h:20</a></div></div>
<div class="ttc" id="fatfs__sup_8c_html_ab3509aecf1844c84f1797e5b567d531c"><div class="ttname"><a href="fatfs__sup_8c.html#ab3509aecf1844c84f1797e5b567d531c">put_rc</a></div><div class="ttdeci">MEMSPACE void put_rc(int rc)</div><div class="ttdoc">display FatFs return code as ascii string </div><div class="ttdef"><b>Definition:</b> <a href="fatfs__sup_8c_source.html#l00145">fatfs_sup.c:145</a></div></div>
<div class="ttc" id="mmc__hal_8c_html_acbc9faece423623a86f62b50ac59b312"><div class="ttname"><a href="mmc__hal_8c.html#acbc9faece423623a86f62b50ac59b312">mmc_wp_status</a></div><div class="ttdeci">MEMSPACE int mmc_wp_status()</div><div class="ttdoc">MMC Card Write Protect status. </div><div class="ttdef"><b>Definition:</b> <a href="mmc__hal_8c_source.html#l00313">mmc_hal.c:313</a></div></div>
<div class="ttc" id="diskio_8c_html_ab00fa450a811dbdabe3c655c1a36fab4"><div class="ttname"><a href="diskio_8c.html#ab00fa450a811dbdabe3c655c1a36fab4">disk_ioctl</a></div><div class="ttdeci">DRESULT disk_ioctl(BYTE pdrv, BYTE cmd, void *buff)</div><div class="ttdef"><b>Definition:</b> <a href="diskio_8c_source.html#l00131">diskio.c:131</a></div></div>
<div class="ttc" id="diskio_8h_html_aacdfef1dad6565f65c26d12fe0ea4b2ba2ea4b6ef3fffc17dd1d38ab5c2837737"><div class="ttname"><a href="diskio_8h.html#aacdfef1dad6565f65c26d12fe0ea4b2ba2ea4b6ef3fffc17dd1d38ab5c2837737">RES_OK</a></div><div class="ttdef"><b>Definition:</b> <a href="diskio_8h_source.html#l00024">diskio.h:24</a></div></div>
<div class="ttc" id="hal_8c_html_a9617412610d280bbb4886674790d7d3e"><div class="ttname"><a href="hal_8c.html#a9617412610d280bbb4886674790d7d3e">spi_TXRX</a></div><div class="ttdeci">uint8_t spi_TXRX(uint8_t data)</div><div class="ttdoc">SPI read and write 1 byte. </div><div class="ttdef"><b>Definition:</b> <a href="hal_8c_source.html#l00483">hal.c:483</a></div></div>
<div class="ttc" id="mmc__hal_8c_html_a35434a6e722b07d8fee213c2256391be"><div class="ttname"><a href="mmc__hal_8c.html#a35434a6e722b07d8fee213c2256391be">mmc_install_timer</a></div><div class="ttdeci">MEMSPACE void mmc_install_timer(void)</div><div class="ttdoc">Install MMC timer task: mmc_task() </div><div class="ttdef"><b>Definition:</b> <a href="mmc__hal_8c_source.html#l00079">mmc_hal.c:79</a></div></div>
<div class="ttc" id="mmc__hal_8c_html_ad417477e66c88b40dcce683fd6a5c47a"><div class="ttname"><a href="mmc__hal_8c.html#ad417477e66c88b40dcce683fd6a5c47a">mmc_init</a></div><div class="ttdeci">MEMSPACE int mmc_init(int verbose)</div><div class="ttdoc">Initialize MMC and FatFs interface, display diagnostics. </div><div class="ttdef"><b>Definition:</b> <a href="mmc__hal_8c_source.html#l00208">mmc_hal.c:208</a></div></div>
<div class="ttc" id="mathio_8h_html"><div class="ttname"><a href="mathio_8h.html">mathio.h</a></div><div class="ttdoc">Math IO functions, and verious conversion code with floating point support. </div></div>
<div class="ttc" id="hal_8c_html_a1fca48fcdb736ef3af2179ae8b10d963"><div class="ttname"><a href="hal_8c.html#a1fca48fcdb736ef3af2179ae8b10d963">spi_RX_buffer</a></div><div class="ttdeci">void spi_RX_buffer(const uint8_t *data, int count)</div><div class="ttdoc">SPI read buffer. </div><div class="ttdef"><b>Definition:</b> <a href="hal_8c_source.html#l00428">hal.c:428</a></div></div>
<div class="ttc" id="mmc__hal_8c_html_a6baca506fd7fb368a968a82e9093b4a0"><div class="ttname"><a href="mmc__hal_8c.html#a6baca506fd7fb368a968a82e9093b4a0">mmc_spi_begin</a></div><div class="ttdeci">void mmc_spi_begin()</div><div class="ttdoc">MMC SPI setup and chip select. </div><div class="ttdef"><b>Definition:</b> <a href="mmc__hal_8c_source.html#l00097">mmc_hal.c:97</a></div></div>
<div class="ttc" id="mmc__hal_8c_html_a8f6b7c1f3819cd4bd2aa114c8ebb7f19"><div class="ttname"><a href="mmc__hal_8c.html#a8f6b7c1f3819cd4bd2aa114c8ebb7f19">mmc_spi_TXRX</a></div><div class="ttdeci">uint8_t mmc_spi_TXRX(uint8_t data)</div><div class="ttdoc">SPI read and write 1 byte. </div><div class="ttdef"><b>Definition:</b> <a href="mmc__hal_8c_source.html#l00150">mmc_hal.c:150</a></div></div>
<div class="ttc" id="diskio_8c_html_a09cdaa6f36fa409bdf002727bff98eb1"><div class="ttname"><a href="diskio_8c.html#a09cdaa6f36fa409bdf002727bff98eb1">disk_initialize</a></div><div class="ttdeci">DSTATUS disk_initialize(BYTE pdrv)</div><div class="ttdef"><b>Definition:</b> <a href="diskio_8c_source.html#l00054">diskio.c:54</a></div></div>
<div class="ttc" id="mmc__hal_8c_html_a7d41efb1efa51ca4c815ee275553ecae"><div class="ttname"><a href="mmc__hal_8c.html#a7d41efb1efa51ca4c815ee275553ecae">mmc_fast</a></div><div class="ttdeci">void mmc_fast()</div><div class="ttdoc">MMC fast SPI bus speed Only called when deselected. </div><div class="ttdef"><b>Definition:</b> <a href="mmc__hal_8c_source.html#l00123">mmc_hal.c:123</a></div></div>
<div class="ttc" id="mmc__hal_8c_html_abb3b85d2e3abc4df68487df05510bb55"><div class="ttname"><a href="mmc__hal_8c.html#abb3b85d2e3abc4df68487df05510bb55">mmc_ms_wait</a></div><div class="ttdeci">MEMSPACE void mmc_ms_wait(int ms)</div><div class="ttdoc">Wait for time in milliseconds. </div><div class="ttdef"><b>Definition:</b> <a href="mmc__hal_8c_source.html#l00194">mmc_hal.c:194</a></div></div>
<div class="ttc" id="mmc__hal_8c_html_a850895a4f23c495249a3074fd2dafbcb"><div class="ttname"><a href="mmc__hal_8c.html#a850895a4f23c495249a3074fd2dafbcb">mmc_spi_TX_buffer</a></div><div class="ttdeci">void mmc_spi_TX_buffer(const uint8_t *data, int count)</div><div class="ttdoc">SPI write buffer. </div><div class="ttdef"><b>Definition:</b> <a href="mmc__hal_8c_source.html#l00133">mmc_hal.c:133</a></div></div>
<div class="ttc" id="mmc__hal_8c_html_a7383533f1b6630ff4f0337f400b4b62e"><div class="ttname"><a href="mmc__hal_8c.html#a7383533f1b6630ff4f0337f400b4b62e">mmc_test_timeout</a></div><div class="ttdeci">MEMSPACE int mmc_test_timeout()</div><div class="ttdoc">Wait for timeout. </div><div class="ttdef"><b>Definition:</b> <a href="mmc__hal_8c_source.html#l00172">mmc_hal.c:172</a></div></div>
<div class="ttc" id="cpu_8h_html_ad0fe97585b8891f5e4f2b9a6426330a4"><div class="ttname"><a href="cpu_8h.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a></div><div class="ttdeci">#define MEMSPACE</div><div class="ttdef"><b>Definition:</b> <a href="cpu_8h_source.html#l00025">cpu.h:25</a></div></div>
<div class="ttc" id="system_8c_html_a9b9f170e9a01e51b57656fcda1f183df"><div class="ttname"><a href="system_8c.html#a9b9f170e9a01e51b57656fcda1f183df">wdt_reset</a></div><div class="ttdeci">MEMSPACE void wdt_reset(void)</div><div class="ttdoc">reset watchdog </div><div class="ttdef"><b>Definition:</b> <a href="system_8c_source.html#l00190">system.c:190</a></div></div>
<div class="ttc" id="mmc__hal_8c_html_a5e05b0c3f7ba56fa9c23be08c497eb9f"><div class="ttname"><a href="mmc__hal_8c.html#a5e05b0c3f7ba56fa9c23be08c497eb9f">Stat</a></div><div class="ttdeci">DSTATUS Stat</div><div class="ttdef"><b>Definition:</b> <a href="mmc_8c_source.html#l00079">mmc.c:79</a></div></div>
<div class="ttc" id="mathio_8h_html_ad6078f8da2d30ecaef99e0c2d250c0c8"><div class="ttname"><a href="mathio_8h.html#ad6078f8da2d30ecaef99e0c2d250c0c8">printf</a></div><div class="ttdeci">MEMSPACE int printf(const char *format,...)</div></div>
<div class="ttc" id="mmc__hal_8c_html_a95af3dbb0e5e0a16710138786c29fb4f"><div class="ttname"><a href="mmc__hal_8c.html#a95af3dbb0e5e0a16710138786c29fb4f">mmc_set_ms_timeout</a></div><div class="ttdeci">MEMSPACE void mmc_set_ms_timeout(uint16_t ms)</div><div class="ttdoc">Set MMC timeout timer in Milliseconds. </div><div class="ttdef"><b>Definition:</b> <a href="mmc__hal_8c_source.html#l00161">mmc_hal.c:161</a></div></div>
<div class="ttc" id="mmc__hal_8c_html_a530d484dee6be1fc954f32f677add7c4"><div class="ttname"><a href="mmc__hal_8c.html#a530d484dee6be1fc954f32f677add7c4">mmc_init_flag</a></div><div class="ttdeci">static int mmc_init_flag</div><div class="ttdoc">has the MMC interface been initialized yet ? </div><div class="ttdef"><b>Definition:</b> <a href="mmc__hal_8c_source.html#l00202">mmc_hal.c:202</a></div></div>
<div class="ttc" id="mmc__hal_8h_html_ae88a5c46f00c634234441978491b16fe"><div class="ttname"><a href="mmc__hal_8h.html#ae88a5c46f00c634234441978491b16fe">mmc_sei</a></div><div class="ttdeci">#define mmc_sei()</div><div class="ttdef"><b>Definition:</b> <a href="mmc__hal_8h_source.html#l00035">mmc_hal.h:35</a></div></div>
<div class="ttc" id="hspi_8h_html"><div class="ttname"><a href="hspi_8h.html">hspi.h</a></div></div>
<div class="ttc" id="hal_8c_html_a445c14cf602a0b3dd085ee963a7986a0"><div class="ttname"><a href="hal_8c.html#a445c14cf602a0b3dd085ee963a7986a0">spi_TX_buffer</a></div><div class="ttdeci">void spi_TX_buffer(const uint8_t *data, int count)</div><div class="ttdoc">SPI write buffer. </div><div class="ttdef"><b>Definition:</b> <a href="hal_8c_source.html#l00414">hal.c:414</a></div></div>
<div class="ttc" id="send_8c_html_aba7bc1797add20fe3efdf37ced1182c5"><div class="ttname"><a href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a></div><div class="ttdeci">unsigned char uint8_t</div><div class="ttdef"><b>Definition:</b> <a href="send_8c_source.html#l00017">send.c:17</a></div></div>
<div class="ttc" id="mmc__hal_8c_html_ae9d8b33ee8fd54f03d5d6946d6022df9"><div class="ttname"><a href="mmc__hal_8c.html#ae9d8b33ee8fd54f03d5d6946d6022df9">mmc_spi_init</a></div><div class="ttdeci">void mmc_spi_init()</div><div class="ttdoc">MMC SPI setup and chip select. </div><div class="ttdef"><b>Definition:</b> <a href="mmc__hal_8c_source.html#l00088">mmc_hal.c:88</a></div></div>
<div class="ttc" id="diskio_8h_html_aec625080763d6cf487e550a6c9a2dd19"><div class="ttname"><a href="diskio_8h.html#aec625080763d6cf487e550a6c9a2dd19">STA_NODISK</a></div><div class="ttdeci">#define STA_NODISK</div><div class="ttdef"><b>Definition:</b> <a href="diskio_8h_source.html#l00054">diskio.h:54</a></div></div>
<div class="ttc" id="fatfs__sup_8c_html_aae427cc909a4b5993032934d85fd8c31"><div class="ttname"><a href="fatfs__sup_8c.html#aae427cc909a4b5993032934d85fd8c31">Fatfs</a></div><div class="ttdeci">FATFS Fatfs[_VOLUMES]</div><div class="ttdoc">FatFs Drive Volumes. </div><div class="ttdef"><b>Definition:</b> <a href="fatfs__sup_8c_source.html#l00043">fatfs_sup.c:43</a></div></div>
<div class="ttc" id="ff_8c_html_a3bff54412627eb9cf8951ec88a464d1c"><div class="ttname"><a href="ff_8c.html#a3bff54412627eb9cf8951ec88a464d1c">f_mount</a></div><div class="ttdeci">MEMSPACE FRESULT f_mount(FATFS *fs, const TCHAR *path, BYTE opt)</div><div class="ttdef"><b>Definition:</b> <a href="ff_8c_source.html#l03255">ff.c:3255</a></div></div>
<div class="ttc" id="fatfs_8h_html"><div class="ttname"><a href="fatfs_8h.html">fatfs.h</a></div></div>
<div class="ttc" id="mmc__hal_8c_html_a5ebdcf7dd5b0f47163d20481a5d09e00"><div class="ttname"><a href="mmc__hal_8c.html#a5ebdcf7dd5b0f47163d20481a5d09e00">mmc_power_on</a></div><div class="ttdeci">MEMSPACE void mmc_power_on()</div><div class="ttdoc">MMC Power ON. </div><div class="ttdef"><b>Definition:</b> <a href="mmc__hal_8c_source.html#l00282">mmc_hal.c:282</a></div></div>
<div class="ttc" id="mmc__hal_8c_html_a3ef82f5ac21c4adcf55addccf88f3d5a"><div class="ttname"><a href="mmc__hal_8c.html#a3ef82f5ac21c4adcf55addccf88f3d5a">mmc_spi_end</a></div><div class="ttdeci">void mmc_spi_end()</div><div class="ttdoc">MMC SPI end and chip deselect. </div><div class="ttdef"><b>Definition:</b> <a href="mmc__hal_8c_source.html#l00104">mmc_hal.c:104</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Jan 31 2018 21:22:16 for ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
